#ifndef __IPC_H__
#define __IPC_H__
#include <stddef.h>
/*  To use this exported function of dll, include this header
 *  in your project.
 */
#ifdef DLL_EXPORT
#define DLLAPI __declspec(dllexport)
#else
#define DLLAPI __declspec(dllimport)
#endif
#ifdef __cplusplus
extern "C" {
#endif
DLLAPI bool SomeFunction(const char *sometext);
DLLAPI bool ipc_active(const char *service);
DLLAPI void ipc_stop();
DLLAPI bool ipc_advise(const char *topic, char *data, int size);
DLLAPI void ipc_set_on_execute(bool (*)(const char *topic, const char *data, int size));
DLLAPI void ipc_set_on_poke(bool (*)(const char *topic, const char *item, char *data, int size));
DLLAPI void ipc_set_on_request(const char *(*)(const char *topic, const char *item, int *size));
DLLAPI void ipc_set_on_startAdvise(bool (*OnStartAdvise)(const char *topic, const char *item));
DLLAPI void ipc_set_on_stopAdvise(bool (*OnStartAdvise)(const char *topic, const char *item));
DLLAPI void ipc_set_on_disconnected(void (*)(const char *topic));

DLLAPI bool ipc_connect(const char *hostname, const char *serviceName, const char *topic);
DLLAPI void ipc_disconnect();
DLLAPI void ipc_set_on_disconnect(void (*)());
DLLAPI void ipc_startAdvise(const char *something);
DLLAPI void ipc_stopAdvise(const char *something);
DLLAPI void ipc_set_on_advise(bool (*)(const char *topic, const char *item, char *data, size_t size));
DLLAPI void ipc_execute(const char *data, size_t size);
DLLAPI bool ipc_poke(const char *item, const char *data, size_t size);
DLLAPI int ipc_request(const char *item, char *buf);
#ifdef __cplusplus
}
#endif
#endif // __IPC_H__
